home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
olrdrs
/
pq214.zip
/
ANSIART.DOC
< prev
next >
Wrap
Text File
|
1991-08-03
|
32KB
|
745 lines
POWER-QWK 2.14 August 1991 (c) Gale Green & Powerline Systems Ltd.
This file, and the accompanying programs, form part of the POWER-QWK
software package. They can ONLY be distributed as part of the
complete POWER-QWK package. Power-Qwk is SHAREWARE. Please register
if you find the software of use.
Ansi Art and Music
~~~~~~~~~~~~~~~~~~
Introduction
~~~~~~~~~~~~
From release 2.06 onwards, Power-QWK supports messages containing
Ansi Music as well as the conventional Ansi colour and cursor
movement sequences and the Ansi Art files which were supported at
release 2.05.
This document describes the Escape Sequences permitted by the ANSI
standard, as implemented by console drivers such as ANSI.SYS and its
clones, and highlights the differences between standard ANSI files
and Ansi Art and Music files.
The ANSI standard defines Escape Sequences which may be embedded
within Ascii text files to describe various characteristics of that
text which are to be applied to it when it is displayed on a video
screen.
The 'characteristics' describe such things as the colour in which
the text is to be displayed, the position on the screen at which the
text is to be displayed, whether the text should be standard,
intense or flashing, and so on.
All this information is read and used by the video driver whenever
the file is displayed.
As well as providing information to the VIDEO driver about the
formatting of subsequent OUTPUT, the Escape Sequences may also
contain instructions which the video driver must pass on to the
KEYBOARD driver to tell it how it is to interpret subsequent INPUT.
A CONSOLE driver, like ANSI.SYS or one of its clones, embodies both
a video driver and a keyboard driver so such information is not
actually passed anywhere but is merely retained by ANSI.SYS when in
video mode for later use when in keyboard mode.
An Escape Sequence is a series of characters which always starts
with the character pair Esc[. That is, the character Escape, or
Ascii 27, followed by a left bracket.
An Escape Sequence may be terminated by any one of the characters in
the following list:
A, B, C, D, H, J, K, R, f, h, l, m, n, p, s, u
Each of these terminators defines a particular type of Escape
Sequence, thus determining the action to be taken by the video
driver and defining what other characters may appear in the
Sequence, between the Esc[ and the terminator.
With one exception, an Escape Sequence may not contain any of the
terminator characters except as its last character.
The exception, as we shall see later, is an Ansi Music Sequence.
The next three sections describe the standard Ansi Escape Sequences,
Ansi Art Escape Sequences and Ansi Music Escape Sequences.
Standard Escape Sequences
~~~~~~~~~~~~~~~~~~~~~~~~~
Esc[x;yH These each move the cursor to row x column y. Rows
Esc[x;yf are numbered from 1 to 25; columns are numbered from
1 to 80. x and y each default to 1 if omitted.
i.e., Esc[H or Esc[f each move the cursor to the
Home position (top left hand corner of the screen);
Esc[xA Moves the cursor UP x rows (but not beyond top of
screen). Cursor column remains unchanged.
Esc[xB Moves the cursor DOWN x rows (but not beyond bottom
of screen). Cursor column remains unchanged.
Esc[xC Moves the cursor RIGHT x columns (but not beyond the
right hand edge of the screen). Cursor row remains
unchanged.
Esc[xD Moves the cursor LEFT x columns (but not beyond the
left hand edge of the screen). Cursor row remains
unchanged.
Esc[s Tells the video driver to remember the current cursor
position for later recall by Esc[u.
Esc[u Moves the cursor to the last position stored by
Esc[s.
Esc[2J Clears the screen and moves the cursor to the Home
position (top left hand corner of the screen).
Esc[K Clears the current row from cursor position to the
right hand edge of the screen.
Esc[=xh Set Screen to Mode x.
mode 0 - 40 by 25 black and white
1 - 40 by 25 colour
2 - 80 by 25 black and white
3 - 80 by 25 colour
4 - 320 by 200 colour
5 - 320 by 200 black and white
6 - 640 by 200 black and white
7 - Set end-of-line wrap ON
Esc[=xl Reset screen to Mode x. (N.B., the 'l' is lower case
L).
This is identical to 'Set Screen Mode', above, except
that when x is 7 end-of-line wrap is switched OFF.
Esc[?7h Set end-of-line wrap ON.
Esc[.....m Set Graphics Rendition
Between the Esc[ and the m may appear as many of the
numbers in the following list as required, separated
by semi-colons. The numbers are processed strictly
left to right.
0 - reset to system defaults of White text, Black
background, High Intensity (Bold) OFF, Blink
OFF.
The remaining values only set particular attributes
ON.
Therefore, whenever you want to alter Intensity or
Blink, you are obliged to reset the colours you
require at the same time.
1 - Set High Intensity (Bold) ON.
5 - Set Blink ON.
8 - Set Conceal ON (renders the display invisible).
30 - Black foreground ON
31 - Red foreground ON
32 - Green foreground ON
33 - Yellow foreground ON
34 - Blue foreground ON
35 - Magenta foreground ON
36 - Cyan foreground ON
37 - White foreground ON
40 - Black background ON
41 - Red background ON
42 - Green background ON
43 - Yellow background ON
44 - Blue background ON
45 - Magenta background ON
46 - Cyan background ON
47 - White background ON
Examples:
Esc[45m set Magenta background leaving all
other attributes unchanged.
Esc[0;1;36m set Light Cyan text on Black
background.
The following sequence displays the word 'Peacock' in
high intensity flashing Blue on a Cyan background,
starting at row 10 column 14. As an aid to clarity,
the character ` (leftward apostrophe) has been used
to represent the Esc character.
`[0;1;5;34;46m`[10;14HPeacock
Esc[....p Keyboard Reassignment (instructions to be passed to